<#assign domain="${ctx.contextPath}" />
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="x-ua-compatible" content="IE=Edge, chrome=1"/>
	<meta name="renderer" content="webkit">
	<title>scoreCard2</title>
	<link rel="stylesheet" href="${domain}/static/css/common/bootstrap.min.css">
	<link rel="stylesheet" href="${domain}/static/css/common/base.css">
	<link rel="stylesheet" href="${domain}/static/css/common/header.css">
	<link rel="stylesheet" href="${domain}/static/css/chsi.css">
	<script src="${domain}/static/js/jquery-3.2.1.slim.min.js"></script>
	<script src="${domain}/static/js/bootstrap.min.js"></script>
	<script src="${domain}/static/js/jquery-3.2.1.min.js"></script>
	<script src="${domain}/static/js/bootstrap.min.js"></script>
	 <link rel="stylesheet" href="${domain}/static/css/bootstrap.css">
	  <link rel="stylesheet" href="${domain}/static/css/bootstrapValidator.css">
	 <script src="../static/js/bootstrapValidator.js"></script>
</head>
<body>

<div class="content">
	<!--侧边导航-->
	<div class="score-card2">
		<div class="wrap">
			<form id="defaultForm" method="post" class="form-horizontal" action="${domain}/yys/getYys">
				<h1>请输入验证码</h1>
				
				<div class="form-group">
  					<div class="line">
					    <input type="text" class="form-control" placeholder="验证码" name="code">
					    <input type="hidden" class="form-control" placeholder="task_id" value="${task_id}" name="taskId">
					    <input type="hidden" class="form-control" placeholder="task_stage" value="${task_stage}" name="taskStage">
					    <input type="hidden" class="form-control" placeholder="request_type" value="${request_type}" name="request_type">
				    </div>
				</div>
				<div name="signup">
           <button type="submit" class="btn btn-primary" data-loading-text="Loading..." autocomplete="off" onclick="loag()" id="btn_login" style="width:188px;margin:0 auto;display:block;">提交</button>
                </div>
			</form>
                                
		</div>
	</div>
</div>

</body>

<script>
function loag() {
var flag = $("#defaultForm").data("bootstrapValidator").isValid();
     if(flag==true){
      var btn = $("#btn_login");
      btn.text('加载中......');
      }
    }

 $(document).ready(function() {

    $('#defaultForm').bootstrapValidator({
//        live: 'disabled',
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
        
        	code: {
            	group: '.form-group',
                validators: {
                	notEmpty: {
                        message: '请输入验证码'
                    },
                    stringLength: {
                            min: 1,
                            max: 7,
                            message: '请输入正确验证码'
                        }
                }
            },
        }
    });


});
       $(document).ready(function(e) { 
            var counter = 0;
            if (window.history && window.history.pushState) {
                             $(window).on('popstate', function () {
                                            window.history.pushState('forward', null, '#');
                                            window.history.forward(1);
                                });
              }

              window.history.pushState('forward', null, '#'); //在IE中必须得有这两行
              window.history.forward(1);
});
</script>
</html>